/**********************************************************************
* COPYRIGHT NOTICE - HYPERSEN TECHNOLOGY
*
* Copyright (c) 2025 , Hypersen Technology, Inc.
*
* All rights reserved.
*
*======================================================================
* @projectName Theme
* @file themeselector.h
* @brief 主题选择器
* @author   Jay
* @email    none
* @version  1.0.0
* @date     2025-10-08
* @license private & classified
*---------------------------------------------------------------------
* Remark:
* 【调用方式】
    // 主题选择器
    ThemeSelector* selector = new ThemeSelector(this);
    // 显示窗口设置
    selector->show();
    selector->activateWindow();
    connect(selector, &ThemeSelector::themeSelected, this, [](const QString& themeName) {
        ThemeManager::instance().setTheme(themeName);
    });
*======================================================================
* Change History:
*---------------------------------------------------------------------
* <Date>      | <Version>  | <Author>  | <Description>
*---------------------------------------------------------------------
* 2025-10-08  | V1.0.0     | Jay       | 主题管理器
**********************************************************************/
#ifndef THEME_SELECTOR_H
#define THEME_SELECTOR_H

#include <QWidget>
#include <QListWidget>
#include <QMouseEvent>
#include <QDebug>

class ThemeSelector : public QWidget {
    Q_OBJECT

public:
    explicit ThemeSelector(QWidget *parent = nullptr);
    ~ThemeSelector(){ qWarning() << " ~ThemeSelector()" << endl; }

signals:
    void themeSelected(const QString& themeName);

private:
    QListWidget* m_themeList;
    void populateThemeList();

    // 添加拖动相关的成员变量
    QPoint m_dragPosition;

    // 添加鼠标事件处理函数声明
    void mousePressEvent(QMouseEvent* event) override;
    void mouseMoveEvent(QMouseEvent* event) override;
    void mouseReleaseEvent(QMouseEvent* event) override;
};

#endif // THEME_SELECTOR_H
